<?php
class PostController extends BaseSiteController
{
	public function actionRead()
	{
		$alias = Yii::app()->request->getParam('alias');
		$alias_attr  = (Yii::app()->language!=Yii::app()->params['language_default'])?"alias_".Yii::app()->language:"alias";
		$data = FNews::model()->find("$alias_attr=:p AND status=".FNews::STATUS_PUBLISHED,array(':p'=>$alias));
		$this->render('read',array('data'=>$data));
	}
	public function actionList()
	{
		$this->render('list');
	}
}